import { ChangeDetectionStrategy, Component } from '@angular/core';
import { OptionItem } from '@iux/live';

@Component({
  selector: 'app-disabled',
  templateUrl: './disabled.component.html',
  changeDetection: ChangeDetectionStrategy.OnPush,
})
export class DisabledComponent {
  data: OptionItem[] = [
    { value: 1, label: 'Option 1', isLeaf: true },
    { value: 2, label: 'Option 2', isLeaf: true },
    { value: 3, label: 'Option 3', isLeaf: true },
    { value: 4, label: 'Option 4', isLeaf: true },
    { value: 5, label: 'Option 5', isLeaf: true },
  ];

  selection = 1;
  multiSelection: number[] | string[] = [1, 2, 3, 4];
  disabled = true;

  constructor() {}

  toggleDisabled() {
    this.disabled = !this.disabled;
  }
}
